import React, { useRef } from "react";
import { PlusOutlined } from "@ant-design/icons";
import { Card, Button, Typography } from "antd";
import AutoTable from "@/components/AutoTable/mtable";


const Welcome = ({route}) => {
  const actionRef = useRef()
  const columns = [
    {
      title: '序列号',
      dataIndex: 'serial',
      key: 'serial',
      width: 200,
      search:false
    },
    {
      title: '组织名称',
      dataIndex: 'name',
      key: 'name',
      width: 200,
      search:false
    },
    {
      title: '状态',
      dataIndex: 'status',
      key: 'status',
      width: 200,
      search: false
    }
  ];
  return (
    <AutoTable
      columns={columns}
      path={"/camera/selfCheck"}
      pagination="false"
      headerTitle={"相机列表"}
      actionRef={actionRef}
      toolBarRender={() => [
        <Button key="3" type="primary" onClick={()=>{
          actionRef?.current?.reload()
        }}>
          自检
        </Button>,
      ]}
    ></AutoTable>
  );
};


export default Welcome;
